-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support GitHub Container Registry #2341
feat: Support GitHub Container Registry #2341
Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “flow:merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “flow:hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @jopemachine and the rest of your teammates on Graphite |
5163c6b
to
ea09bab
Compare
9b1a455
to
0515970
Compare
0515970
to
f760569
Compare
f760569
to
a9cb945
Compare
a9cb945
to
aa11f50
Compare
aa11f50
to
a54cdc2
Compare
52810f8
to
f1a4645
Compare
f1a4645
to
0a1729a
Compare
Closed as #1917 stack was merged. |
Partially fix #2337.
Overview of the changes
base.py
's_scan_tag
update for handlingMEDIA_TYPE_DOCKER_MANIFEST
In the existing code, only
MEDIA_TYPE_DOCKER_MANIFEST_LIST
andMEDIA_TYPE_OCI_INDEX
types were handled in_scan_tag
, so a runtime error occurred whenMEDIA_TYPE_DOCKER_MANIFEST
type was passed ascontent_type
.However, in
harbor.py
, handling based onmanifest_media_type
is processed by separate functions such as_process_oci_index
and_process_docker_v2_multiplatform_image
, so handling forMEDIA_TYPE_DOCKER_MANIFEST
has been added by extracting these functions with the same signatures.Adding handling for the
MEDIA_TYPE_DOCKER_MANIFEST
type (_process_docker_v2_image
) seems not to be specific only to ghcr, so it was added tobase.py
.Test
Manually tested it using the following methods.
In this PR, the
cr.backend.ai/stable/python:3.9-ubuntu20.04
image is used as a placeholder for testing.Prerequisite
cr.backend.ai/stable/python
image to your GitHub package for testing.etcd
.Note
The
entity_type
should be either "users" or "orgs".container_registry
column of thegroups
table.ghcr.io
value toallowed_docker_registries
column ofdomains
table using below commandTest scenarios
Verify that the container registry added in this PR is functioning based on several scenarios.
If there are additional scenarios that need testing, please leave a comment.
1. Image Rescan
Image rescanning should work through the following command.
2. Create a session from the pulled image
Run a session using the downloaded image.
3. Commit the changes and push it to the container registry.
For committing a session, it is necessary to assume that the your "GitHub ID" is included in
config/docker/registry/ghcr.io/project
in etcd.Enter the key value using the following command.
Commit the changes using the
convert-to-image
command and push them to the container registry.Checklist: (if applicable)